package net.angrynut.web.handler.endpoint;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
import org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 仿照 {@link MetricsMvcEndpoint} 写一个自定义的 Endpoint。
 */
@Component
@ConfigurationProperties(prefix = "endpoints.demoEndpoint")
public class DemoMvcEndpoint extends EndpointMvcAdapter {

    private final DemoEndpoint delegate;

    @Autowired
    public DemoMvcEndpoint(DemoEndpoint delegate) {
        super(delegate);
        this.delegate = delegate;
    }
}
